<?php
/**
 * @Author: gan
 * @Description:
 * @File:  RabbitMQFactory
 * @Version: 1.0.0
 * @Date: 2021/12/29 2:55 下午
 */

namespace RX\Component\MQ;

use RX\Component\MQ\Impl\MQInterface;
use RX\Component\MQ\Impl\RabbitImpl;

class RabbitMQFactory implements MQFactory
{
    private array $config;

    public function __construct(array $config = [])
    {
        $this->config = $config;
    }

    public function createMQ(): RabbitImpl
    {
        return new RabbitImpl($this->config);
    }
}
